<form 
	id="form_turma" 
	name="form_turma"
	class="form-horizontal"
	action="<?php echo url_for('turma/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_turma='.$form->getObject()->getIdTurma() : '')) ?>" 
	method="post" 
	<?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>
>
	<?php if (!$form->getObject()->isNew()): ?>
		<input type="hidden" name="sf_method" value="put" />
		<input type="hidden" name="id_turma" value="<?php echo $form->getObject()->getIdTurma() ?>" />
	<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
	
	
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['nm_turma']->renderLabel() ?></label>
            <div class="controls">
            <?php echo $form['nm_turma']->render(array('size' => 50)) ?>
                  <?php echo form_error('nm_turma'); ?>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['nu_turma']->renderLabel() ?></label>
            <div class="controls">
            <?php echo $form['nu_turma']->render(array('size' => 50)) ?>
                  <?php echo form_error('nu_turma'); ?>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['ds_turma']->renderLabel() ?></label>
            <div class="controls">
            <?php echo $form['ds_turma']->render(array('size' => 50)) ?>
                  <?php echo form_error('ds_turma'); ?>
            </div>
          </div>
          <div class="control-group">
            <label class="control-label" for="input01"><?php echo $form['st_turma']->renderLabel() ?></label>
            <div class="controls">
            <?php echo $form['st_turma']->render(array('size' => 50)) ?>
                  <?php echo form_error('st_turma'); ?>
            </div>
          </div>
 
	<?php
		comandos_form(
			link_to(
				':: Voltar ::',
				$sf_context->getModuleName().'/list',
				array('class' => 'btn btn-info')
			),
			'<button type="submit" class="btn btn-info">:: Salvar ::</button>'
		);
	?>
</form>

<script>
    $(function()
        {
            System.formdata.save(new Array("msgAlerta", "Atenção:"));
        }
    );
</script>

<?php preenche_mensagem_flash() ?>